package cn.licoy.wdog.core.controller.hospital;

import cn.licoy.wdog.common.annotation.SysLogs;
import cn.licoy.wdog.common.bean.ResponseCode;
import cn.licoy.wdog.common.bean.ResponseResult;
import cn.licoy.wdog.core.config.jwt.JwtToken;
import cn.licoy.wdog.core.dto.hospitalUser.HospitalUserDto;
import cn.licoy.wdog.core.dto.hospitalUser.RegionDto;
import cn.licoy.wdog.core.entity.hospital.Region;
import cn.licoy.wdog.core.entity.hospital.Title;
import cn.licoy.wdog.core.service.hospital.RegionService;
import com.baomidou.mybatisplus.plugins.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Sunne
 * Create time 2018/6/22 16:18
 * @return null
 **/
@RestController
@RequestMapping(value = "/region")
@Api(tags = {"第一期--地区操作"})
public class RegionController {
    @Autowired
    RegionService regionService;
    @PostMapping(value = {"/add"})
    @ApiOperation(value = "新增医院地区")
    @SysLogs("新增医院地区")
    public ResponseResult add(@RequestBody @Validated @ApiParam(value = "新增医院地区") RegionDto regionDto){
        regionService.add(regionDto);
        return ResponseResult.e(ResponseCode.OK,"操作成功");
    }
}